-- GENERATED SPELL FOR [Darkweaver Syth] --


function spell0_18472(pUnit, Event) --@Arcane Shock,n/a--
pUnit:FullCastSpellOnTarget(33534,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18472', 12000, 1)
end

function spell1_18472(pUnit, Event) --@Arcane Shock,n/a--
pUnit:FullCastSpellOnTarget(38135,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18472', 12000, 1)
end

function spell2_18472(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(15305,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18472', 3000, 1)
end

function spell3_18472(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(15659,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18472', 3000, 1)
end

function spell4_18472(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(15039,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18472', 12000, 1)
end

function spell5_18472(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(15616,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18472', 12000, 1)
end

function spell6_18472(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(12548,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18472', 8355, 1)
end

function spell7_18472(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(21401,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18472', 8356, 1)
end

function spell8_18472(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(33620,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18472', 12000, 1)
end

function spell9_18472(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(38136,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18472', 12000, 1)
end

function Sorts_18472(pUnit, Event)
local choix_sorts_18472 = math.random(0, 9)
if choix_sorts_18472 == 0 then
pUnit:RegisterEvent('spell0_18472', 1, 1)
end
if choix_sorts_18472 == 1 then
pUnit:RegisterEvent('spell1_18472', 1, 1)
end
if choix_sorts_18472 == 2 then
pUnit:RegisterEvent('spell2_18472', 1, 1)
end
if choix_sorts_18472 == 3 then
pUnit:RegisterEvent('spell3_18472', 1, 1)
end
if choix_sorts_18472 == 4 then
pUnit:RegisterEvent('spell4_18472', 1, 1)
end
if choix_sorts_18472 == 5 then
pUnit:RegisterEvent('spell5_18472', 1, 1)
end
if choix_sorts_18472 == 6 then
pUnit:RegisterEvent('spell6_18472', 1, 1)
end
if choix_sorts_18472 == 7 then
pUnit:RegisterEvent('spell7_18472', 1, 1)
end
if choix_sorts_18472 == 8 then
pUnit:RegisterEvent('spell8_18472', 1, 1)
end
if choix_sorts_18472 == 9 then
pUnit:RegisterEvent('spell9_18472', 1, 1)
end
end

function mob18472_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18472', math.random(1500, 3000), 1)
end

function mob18472_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18472_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18472_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18472, 1, 'mob18472_Action')
RegisterUnitEvent(18472, 2, 'mob18472_Leave')
RegisterUnitEvent(18472, 3, 'mob18472_Kill')
RegisterUnitEvent(18472, 4, 'mob18472_Die')
